package tt.lab.pmbok.dto;

import java.util.ArrayList;
import java.util.List;

public class Tree {

	private int id;
	private String name;
	private String type;
	private boolean leaf;
	private boolean loaded;
	private List<Tree> children = new ArrayList<Tree>();
	
	public Tree(int id, String name, String type, boolean loaded, boolean leaf) {
		this.id = id;
		this.name = name;
		this.type = type;
		this.loaded = loaded;
		this.leaf = leaf;
	}

	
	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getType() {
		return type;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void addChild(Tree tree){
		this.getChildren().add(tree);
	}
	public List<Tree> getChildren() {
		return children;
	}

	public void setChildren(List<Tree> children) {
		this.children = children;
	}


	public boolean isLeaf() {
		return leaf;
	}


	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}


	public boolean isLoaded() {
		return loaded;
	}


	public void setLoaded(boolean loaded) {
		this.loaded = loaded;
	}
}
